<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let obj = {
            name: "twj",
            age: 100
        }
        //Object.keys(对象名)：得到对象中所有key
        console.log(Object.keys(obj))
        //Object.values(对象名)：得到对象中所有value
        console.log(Object.values(obj))
        //Object.entries(对象名)：得到对象中所有键值对
        console.log(Object.entries(obj))
        //通过entries可以快速将对象转换成map
        let m = new Map(Object.entries(obj))
        console.log(m)
        //Object.getOwnPropertyDescriptors(对象名)：得到对象属性的所有属性修饰符
        console.log(Object.getOwnPropertyDescriptors(obj))

    </script>
</body>

</html>